import store from '@/store'

if (store.getters.isInnerApp) {
  // 调用原生方法获取用户信息，并存入store，测试未获取到用户信息的情况
  // JSCallNative('getUserInfo', {
  //   param: {},
  //   successCallBack: (data) => {
  //     store.dispatch('user/setUserInfo', data)
  //   },
  //   failedCallBack: (msg) => {
  //   }
  // })
  // 调用原生方法获取机型信息
  // JSCallNative('getDeviceInfo', {
  //   param: {},
  //   successCallBack: (data) => {
  //     const { barHeight = '0', navHeight = '44', deviceType } = data
  //     store.dispatch('app/setDeviceInfo', data)
  //     document.documentElement.style.setProperty('--bar-height', `${barHeight}px`)
  //     document.documentElement.style.setProperty('--nav-height', `${navHeight}px`)
  //     document.documentElement.style.setProperty('--top-height', `${+navHeight + +barHeight}px`)
  //   },
  //   failedCallBack: (msg) => {
  //   }
  // })
} else {
  const data = {
    // token: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTcwMzIzNjA2NSwianRpIjoiOWYyMjNiYTktZjk4Ni00NjljLThhNjEtMzhmZTNkMDY5MTZjIiwidHlwZSI6Miwic3ViIjo0NjMzNzg2ODYyMjQ0NTQsIm5iZiI6MTcwMzIzNjA2NSwiZXhwIjoxNzA1ODI4MDY1fQ._68rm5AsLLJAIaNyyRhQ5B_0LtPv66PJbxB25q6toFs',
    // user_id: '17',
    // phone: '17633922884',
    // nike_name: '莹莹',
    // avatar: 'https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoiaTFQcOicxnTkYTS6ibMrr2IrHsDkeLicZia0dZ6f4u8MlNEWbdd65Thmn6YibuQjlY76micUGowtcicDWg/132',
    // user_status: '1',
    // identify_fail_reason: null,
    // app_type: null,
    // app_user_key: null,
    // app_key_extra: null,
    // duty_type: '2',
    // operator_tag: '1',
    // tenant_id: null,
    // swap_operation_name: null
  }
  // store.dispatch('user/setUserInfo', data)
  document.documentElement.style.setProperty('--bar-height', '0px')
  document.documentElement.style.setProperty('--nav-height', '50px')
  document.documentElement.style.setProperty('--top-height', '50px')
}






